/*
 * @Author: your name
 * @Date: 2021-03-29 18:27:34
 * @LastEditTime: 2021-04-01 20:00:45
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \vue-admin-template-master\src\api\product\trademark.js
 */
//有关于trademark的接口函数
// DELETE /admin/product/baseTrademark/remove/{id}
// 删除BaseTrademark

// POST /admin/product/baseTrademark/save
// 新增BaseTrademark

// PUT /admin/product/baseTrademark/update
// 修改BaseTrademark

// GET /admin/product/baseTrademark/{page}/{limit}
// 分页列表
import request from '@/utils/request'
export default {
  //删除
  delete (id) {
    return request.delete(`/admin/product/baseTrademark/remove/${id}`)
  },
  //修改或者新增
  updateTrademark (trademark) {
    if (trademark.id) {
      return request.put('/admin/product/baseTrademark/update', trademark)
    } else {
      return request.post('/admin/product/baseTrademark/save', trademark)
    }
  },
  //获取分页数据
  getPageList (page, limit) {
    return request.get(`/admin/product/baseTrademark/${page}/${limit}`)
  },
  getList () {
    return request.get('/admin/product/baseTrademark/getTrademarkList')
  }
}